﻿using Microsoft.EntityFrameworkCore;
using Sample.Novel.Domain.Author.Entites;
using Sample.Novel.Domain.Book.Entites;
using Sample.Novel.Domain.Category.Entites;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace Sample.Novel.EntityFrameworkCore
{
    [ConnectionStringName("Novel")]
    public class NovelDbContext : AbpDbContext<NovelDbContext>
    {
        public DbSet<Author> Authors { get; set; }
        public DbSet<Category>  Categories { get; set; }
        public DbSet<Book> Books { get; set; }
        public DbSet<Volume>  Volumes { get; set; }
        public DbSet<Chapter> Chapters { get; set; }
        public DbSet<ChapterText>  ChapterTexts { get; set; }

        public NovelDbContext(DbContextOptions<NovelDbContext> options) : base(options)
        { 
        }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
        }
    }
}
